package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.Reservation;
import com.zzyl.vo.CountVo;
import com.zzyl.vo.ReservationVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface CustomerReservationMapper {

    Integer cancelledCount(LocalDateTime localDateTime, LocalDateTime localDateTime1, Long userId);

    List<CountVo> countByTime(@Param("time") LocalDateTime time, @Param("endTime") LocalDateTime endTime);

    void add(Reservation reservation);

    Page<ReservationVo> page(Integer status);

    void cancel(Long id);
}
